<template>
  <el-dialog title="订单详情" width="60%" :before-close="dialogClose" :visible.sync="show">
      <div class="diao_top">
        <div class="diao_item">
          单&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号:
          <el-input v-model="item.orderNum" class="select_input1"
            size="small" placeholder="单号" disabled></el-input>
        </div>
        <div class="diao_item">
          下单日期:<el-input v-model="item.addtime" class="select_input1"
            size="small" placeholder="采购日期" disabled></el-input>
        </div>
        <div class="diao_item">
          客户名称:<el-input v-model="item.customer_name" class="select_input1"
            size="small" placeholder="供应商名称" disabled></el-input>
        </div>
        <div class="diao_item">
          销售日期:<el-input v-model="item.saleDate" class="select_input1"
            size="small" placeholder="采购日期" disabled></el-input>
        </div>
        <div class="diao_item">
          收款日期:<el-input v-model="item.payDate" class="select_input1"
            size="small" placeholder="付款日期" disabled></el-input>
        </div>
        <div class="diao_item">
          送货日期:<el-input v-model="item.takeDate" class="select_input1"
            size="small" placeholder="收货日期" disabled></el-input>
        </div>
        <div class="diao_item">
          配送地址:<el-input v-model="item.address" class="select_input1"
            size="small" placeholder="配送地址" disabled></el-input>
        </div>
        <div class="diao_item">
          订单金额:<el-input v-model="item.totalMoney" class="select_input1"
            size="small" placeholder="收货日期" disabled></el-input>
        </div>
      </div>
      <el-table :data="arr" style="width: 100%;margin-top:10px;"
          row-key="id" border lazy
        :tree-props="{children: 'son', hasChildren: 'hasChildren'}">
        <el-table-column prop="goods_name" label="商品名称" align="center" width="120"></el-table-column>
        <el-table-column prop="goods_img" label="商品图片" align="center" width="100">
            <template slot-scope="scope">            
              <img :src="imgUrl+scope.row.goods_img" width="70" height="40" />
            </template>
        </el-table-column>
        <el-table-column prop="price" label="销售单价" align="center" width="100"></el-table-column>
        <el-table-column prop="num" label="销售数量" align="center" width="100"></el-table-column>
        <el-table-column prop="money" label="商品总价" align="center" width="100"></el-table-column>
        <el-table-column prop="lable" label="单位" align="center" width="100"></el-table-column>
        <el-table-column prop="tag" label="规格" align="center" width="100"></el-table-column>
      </el-table>
    </el-dialog>
</template>
 
<script>
export default {
  name: 'detail',
  props:['show','item','arr'],
  data() {
    return {
      imgUrl:this.url
    }
  },
  created: function() {
  },
  methods: {
    dialogClose:function(){
      this.$emit("func",{'key':'detailShow','type':0})
    }
  }
}
</script>
<style>
.diao_top{
  display:flex;
  flex-direction:row;
  justify-content:space-between;
  flex-wrap:wrap;
  margin-top:-35px;
}
.diao_item{
  display:flex;
  flex-direction:row;
  height:50px;
  line-height:50px;
}
</style>